C (223/301)

From:Ben Hutchings
Date:08 Aug 99 at 18:56:40
Subject:Re: Re: Menus and Hooks

From: Ben Hutchings <womble@zzumbouk.demon.co.uk>

On Sat, Aug 07, 1999 at 01:50:19PM +0100, Martyn Capewell wrote:
> From: Martyn Capewell <martyn@jubileeweb.freeserve.co.uk>
>
> Hello David
>
> On 06-Aug-99, you wrote:
>
> > From: "David McMinn" <D.Mcminn@eee.rgu.ac.uk>
> >
> >
> > You just specify the shortcut key, the <A> graphic will be added by
> > Intuition automatically.
>
> I've tried that and it doesn't seem to happen.
>
> After following up another reply, I've found that it works if I remove the
> NM_COMMANDSTRING flag, from the flags field of the NewMenu structure. So
> what is NM_COMMANDSTRING meant to do?

NM_COMMANDSTRING is for use when you want to use a keyboard command
other than an Amiga-combination, e.g. an F-key. In that case you must
pass a string containing a description of the keyboard command, and
Gadtools will put that on the right hand side of the menu directly
rather than using Intuition's Amiga-key support. You must also check
for the keyboard command yourself; Intuition only translates right-
Amiga-combinations.

<snip>
> But I still can't initialise the h_Entry field of the Hook structure. If I
> do this:
>
> hook->h_Entry = (HOOKFUNC)abortdrawfunc;
>
> VBCC complains "unknown identifier <abortdrawfunc>".

Then that's a bug in VBCC.

<snip>
> Does anyone know how to obtain a function pointer in VBCC?

Try putting &abortdrawfunc instead. But do report this bug.



Ben Hutchings - womble@zzumbouk.demon.co.uk, http://www.zzumbouk.demon.co.uk
Team *AMIGA* | Jay Miner Society | Linux - the choice of a GNU generation
It is easier to change the specification to fit the program than vice versa.